#include "event.h"
#include "msg.h"

void event_menu_set_screen(event *e)
{
    char buffer[20];
    
    if(e->type != EVENT_SET_SCREEN)
        return;
    
    cmd_set_screen(e->ScreenId,buffer);
    menu_send_msg(buffer,sizeof(buffer));
}

event menu_get_event(void)
{
    char buffer[20];
    event e;
    
    menu_recv_msg(buffer);
    if(msg_explain(buffer,&e) != 1)
        e.type = DEFAULT_EVENT;
    
    return e;    
}


// end of file -----------------------------------------------------------------

